package com.example.larouzey.zyfyp_201.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Toast;

import com.example.larouzey.zyfyp_201.R;
import com.example.larouzey.zyfyp_201.bean.LoginBean;
import com.example.larouzey.zyfyp_201.iface.Registerlistener;
import com.example.larouzey.zyfyp_201.model.Registermodel;

import java.util.List;


public class RegisterActivity extends AppCompatActivity implements View.OnClickListener, Registerlistener {
    private EditText edt,eda,edn,edp;
    private Button btr,btl;
    private ImageButton im;
    private Registermodel registermodel;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        Toast.makeText(this,"",Toast.LENGTH_SHORT);

        edn=(EditText)findViewById(R.id.editText3);
        edt=(EditText)findViewById(R.id.editText4);
        edn=(EditText)findViewById(R.id.editText6);
        edp=(EditText)findViewById(R.id.editText10);
        btr=(Button)findViewById(R.id.button4);
        btl=(Button)findViewById(R.id.button5);

        btr.setOnClickListener(this);
        btl.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.button4:
                registermodel=new Registermodel();
                registermodel.getResultList(edn.getText().toString(),edp.getText().toString(), this);
                break;
            case R.id.button5:
                break;
        }
    }

    @Override
    public void onResponse(List<LoginBean> beanList) {

    }

    @Override
    public void onFail(String msg) {

    }
}
